package com.insuremonitor.system.service.impl;

import java.util.List;
import com.insuremonitor.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.insuremonitor.system.mapper.FrontReportInsureAccountMapper;
import com.insuremonitor.system.domain.FrontReportInsureAccount;
import com.insuremonitor.system.service.IFrontReportInsureAccountService;

/**
 * 保险报案收款Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-14
 */
@Service
public class FrontReportInsureAccountServiceImpl implements IFrontReportInsureAccountService 
{
    @Autowired
    private FrontReportInsureAccountMapper frontReportInsureAccountMapper;

    /**
     * 查询保险报案收款
     * 
     * @param reportInsureId 保险报案收款主键
     * @return 保险报案收款
     */
    @Override
    public FrontReportInsureAccount selectFrontReportInsureAccountByReportInsureId(Long reportInsureId)
    {
        return frontReportInsureAccountMapper.selectFrontReportInsureAccountByReportInsureId(reportInsureId);
    }

    /**
     * 查询保险报案收款列表
     * 
     * @param frontReportInsureAccount 保险报案收款
     * @return 保险报案收款
     */
    @Override
    public List<FrontReportInsureAccount> selectFrontReportInsureAccountList(FrontReportInsureAccount frontReportInsureAccount)
    {
        return frontReportInsureAccountMapper.selectFrontReportInsureAccountList(frontReportInsureAccount);
    }

    /**
     * 新增保险报案收款
     * 
     * @param frontReportInsureAccount 保险报案收款
     * @return 结果
     */
    @Override
    public int insertFrontReportInsureAccount(FrontReportInsureAccount frontReportInsureAccount)
    {
        frontReportInsureAccount.setCreateTime(DateUtils.getNowDate());
        return frontReportInsureAccountMapper.insertFrontReportInsureAccount(frontReportInsureAccount);
    }

    /**
     * 修改保险报案收款
     * 
     * @param frontReportInsureAccount 保险报案收款
     * @return 结果
     */
    @Override
    public int updateFrontReportInsureAccount(FrontReportInsureAccount frontReportInsureAccount)
    {
        frontReportInsureAccount.setUpdateTime(DateUtils.getNowDate());
        return frontReportInsureAccountMapper.updateFrontReportInsureAccount(frontReportInsureAccount);
    }

    /**
     * 批量删除保险报案收款
     * 
     * @param reportInsureIds 需要删除的保险报案收款主键
     * @return 结果
     */
    @Override
    public int deleteFrontReportInsureAccountByReportInsureIds(Long[] reportInsureIds)
    {
        return frontReportInsureAccountMapper.deleteFrontReportInsureAccountByReportInsureIds(reportInsureIds);
    }


}
